// *************************************************************************************************
//
// MK3D Engine
// --------------------------------------
// Copyright (C) 2007-2011 Zeb (mailto: zebbey@gmail.com)
//
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//
// *************************************************************************************************

#ifndef __H_MK_SCENE__
#define __H_MK_SCENE__

#include "mk_scene_node.h"
#include "mk_light_ambient.h"
#include "mk_light_direction.h"

#include "mk_shadow_TSM.h"

namespace MK3DE
{
	class CTexture2D;

	class MK3DE_API CScene : public CSceneNode
	{
	public:
		CScene();
		~CScene();

		void Enable(BOOL bEnable) { _bEnable = bEnable; }
		BOOL IsEnable() { return _bEnable; }

		//! Manage lights.
		CLightAmbient* GetAmbientLight() { return &_ambientLight; }
		CLightDirection* GetDirectionLight() { return &_directionLight; }

		//! Shadow mapping.
		void SetShadowMap(CTexture2D* shadowMap) { _rtShadowMap = shadowMap; }
		CTexture2D* GetShadowMapTexture() { return _rtShadowMap; }
		CShadowTSM* GetShadowMapCalculator() { return &_tsm; }

	private:
		BOOL _bEnable;

		CLightAmbient _ambientLight;
		CLightDirection _directionLight;

		CTexture2D* _rtShadowMap;
		CShadowTSM _tsm;
	};
}

#endif // __H_MK_SCENE__